package com.wing.platform.feign;

import com.alibaba.fastjson.JSONObject;
import com.wing.common.utils.JsonResult;
import com.wing.common.utils.PageResult;
import com.wing.platform.cabinet.Supplier;
import com.wing.platform.order.model.entity.OrderDeliveryDetail;
import com.wing.platform.order.model.entity.*;
import com.wing.platform.order.model.request.*;
import com.wing.platform.order.model.response.*;
import com.wing.platform.storage.request.InventoryInoutPlanForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;


@FeignClient(name = "platform",url = "${platform.gatewayUrl}")
public interface PlatformClient {

        @GetMapping(value = "platformCab/cabinet/admin/supplier/list")
        PageResult<Supplier> getSupplier(
                @RequestHeader(value = "secret",required = false)String secret
                ,@RequestParam(value ="page", defaultValue = "1") Integer page
                ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
                ,@RequestParam(value ="sort", defaultValue = "create_time") String sort
                ,@RequestParam(value = "order",defaultValue = "asc") String order
        );

        /*刀具柜常用刀具从平台添加功能，从平台查询*/
        @GetMapping(value = "/platform/product/admin/product/list")
        Object queryFromPlatform(
                @RequestHeader(value = "secret",required = false)String secret
                ,@RequestParam(value ="page",defaultValue = "1") Integer page
                , @RequestParam(value = "limit",defaultValue = "10") Integer limit
                , @RequestParam(value ="sort",defaultValue = "create_time") String sort
                , @RequestParam(value ="order",defaultValue = "asc") String order
                , @RequestParam(value ="productTypeId",required = false) Long productTypeId//产品类型
                , @RequestParam(value ="settledCompanyId",required = false) String settledCompanyId
                , @RequestParam(value ="status",defaultValue = "0") String status
                , @RequestParam(value ="name",required = false) String name
                , @RequestParam(value = "type", defaultValue = "0") Integer type
                , @RequestParam(value = "brandName", required = false) String brandName
                , @RequestParam(value = "productCode", required = false) String productCode
                , @RequestParam(value ="productCategoryId",required = false) Long productCategoryId//产品分类
                , @RequestParam(value ="productBrandId",required = false) Long productBrandId//产品品牌
                , @RequestParam(value ="productUnitId",required = false) Long productUnitId//产品单位
        );


        /*product表新增数据根据productId从平台端的product表查询获取*/
        @GetMapping(value = "/platform/product/admin/product/getProductById")
        JsonResult<ProductVO> queryProductFromPlatform(
                @RequestHeader(value = "secret",required = false)String secret
                ,@RequestParam(value ="productId") Long productId
        );



        /*扫描包装码*/
        @GetMapping(value = "platformCab/order/app/orderDelivery/addReceipt")
        JSONObject addReceipt(
                 @RequestParam(value = "packLabelCode")String packLabelCode
                ,@RequestParam(value ="deliveryOrderCode") String deliveryOrderCode
                ,@RequestParam(value = "detailId")Integer detailId
        );

        /*根据id修改配送对象的异常数*/
        @GetMapping(value = "platformCab/order/app/orderDelivery/upDeliveryDetail")
        JSONObject upDeliveryDetail(
                @RequestParam(value = "id")Long id
                ,@RequestParam(value = "abnormalNum")Integer abnormalNum
        );

    /**
     *
     * @param type 判断是什么请求  upAbnormalNum(修改异常数量) upRealReceive(修改签收数量) upDeliveryDetail(修改配送详情表状态) upDelivery(修改配送表状态)
     * @param id 详情Id
     * @param abnormalNum 异常数量
     * @param packLabelCode 条码
     * @param deliveryId 主表id
     * @param realReceive 签收数量
     * @return
     */
    @PutMapping(value = "platformCab/order/app/orderDelivery/upAll")
    int upAll(
            @RequestParam(value = "type")String type,
             @RequestParam(value = "id",required = false)Long id,
             @RequestParam(value = "abnormalNum",required = false)Integer abnormalNum,
             @RequestParam(value = "packLabelCode",required = false)String packLabelCode,
             @RequestParam(value = "deliveryId",required = false)Long deliveryId,
             @RequestParam(value = "realReceive",required = false)Integer realReceive
    );

        /*扫描包装码签收*/
        @GetMapping(value = "platformCab/order/app/orderDelivery/scanSign")
        JSONObject scanSign(
                @RequestParam("packLabelCode") String packLabelCode
                ,@RequestParam("realReceive")Integer realReceive
                ,@RequestParam("deliveryOrderCode")String deliveryOrderCode
                ,@RequestParam(value = "remark",required = false)String remark
                ,@RequestParam("abnormalNum")Integer abnormalNum
                ,@RequestParam(value = "detailId") Integer detailId
        );
     /*后台 扫描包装码签收*/
        @GetMapping(value = "platformCab/order/admin/orderDelivery/backstageScanSign")
        JSONObject backstageScanSign(
                 @RequestParam(value = "packLabelCode")String packLabelCode
                 ,@RequestParam(value = "realReceive")Integer realReceive
                ,@RequestParam(value ="deliveryOrderCode") String deliveryOrderCode
                 ,@RequestParam("abnormalNum")Long abnormalNum
        );

        /*确定提交*/
        @GetMapping(value = "platformCab/order/app/orderDelivery/signSubmit")
        JsonResult<List<OrderDeliveryVO>> signSubmit(
                @RequestParam(value ="deliveryOrderCode") String deliveryOrderCode
                ,@RequestParam("detailId") Integer detailId
        );
        /*
        获取同一批信息
         */
        @GetMapping(value = "platformCab/order/app/orderDelivery/orderLableInfo")
        List<OrderDeliveryVO>orderLableInfo(
                @RequestParam(value ="deliveryOrderCode") String deliveryOrderCode
        );
      @GetMapping(value = "platformCab/order/app/orderDelivery/isSignProduct")
      int isSignProduct(
                @RequestParam(value ="deliveryOrderCode") String deliveryOrderCode,
                @RequestParam(value ="skuCode") String skuCode
        );

    /**
     *
     * @param type 请求类型 signNum(签收产品下条码数量) signAllNum(配送单下所有产品的签收条码数量)
     * @param deliveryOrderCode
     * @param skuCode
     * @return
     */
      @GetMapping(value = "platformCab/order/app/orderDelivery/countNum")
      int countNum(
                @RequestParam(value = "type")String type,
                @RequestParam(value ="deliveryOrderCode",required = false) String deliveryOrderCode,
                @RequestParam(value ="skuCode",required = false) String skuCode
        );

          /*修改配送表明细状态*/
        @GetMapping("platformCab/order/app/orderDelivery/upDetail")
        public JsonResult upDetail(@RequestParam(value = "id")Long id);

        /*查询已扫描签收*/
        @GetMapping(value = "platformCab/order/app/orderDelivery/getScanInfo")
        JSONObject getScanInfo(
                @RequestParam(value ="deliveryOrderCode") String deliveryOrderCode
        );

        /*云仓产品列表，从平台查询*/
        @GetMapping(value = "platform/order/admin/inventoryProduct/list")
        PageResult<ProductDetail> getInventoryProductList(
                @RequestParam(value ="page", defaultValue = "1") Integer page
                ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
                ,@RequestParam(value ="sort", defaultValue = "create_time") String sort
                ,@RequestParam(value = "order",defaultValue = "asc") String order
                ,@RequestParam(value = "skuName",required = false) String skuName
                ,@RequestParam(value = "skuCode",required = false) String skuCode
                ,@RequestParam(value = "productCategoryId",required = false) String productCategoryId
                ,@RequestParam(value = "companyName",required = false) String companyName
                ,@RequestParam(value = "enterpriseId",required = false) String enterpriseId
        );
        /*云仓产品列表，从平台查询*/
        @GetMapping(value = "platform/order/admin/inventoryProduct/detail")
        ProductDetailVO detailById(@RequestParam(value = "id",required = false)Long id);

        /*云仓出库配货列表，从平台查询*/
        @GetMapping(value = "platformCab/order/app/orderDistribution/getOrderDistributionList")
        PageResult<OrderDistributionVO> getOrderDistributionList(
                 @RequestParam(value ="page", defaultValue = "1") Integer page
                ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
                ,@RequestParam(value ="sort", defaultValue = "create_time") String sort
                ,@RequestParam(value = "order",defaultValue = "asc") String order
                ,@RequestParam(value ="distCode",required = false) String distCode
                ,@RequestParam(value ="id",required = false) Long id
                ,@RequestParam(value ="status",required = false) Integer status
                ,@RequestParam(value ="startCreateTime",required = false) String startCreateTime
                ,@RequestParam(value ="endCreateTime",required = false) String endCreateTime
                ,@RequestParam(value ="enterpriseId",required = true) Long enterpriseId
        );
        /*查询所有配货任务明细 根据配货任务ID，从平台查询*/
        @GetMapping(value = "platformCab/order/app/orderDistributionDetail/getDistributionDetailList")
        PageResult<OrderDistributionDetailVO> getDistributionDetailList(
                @RequestParam(value ="page", defaultValue = "1") Integer page
                ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
                ,@RequestParam(value ="sort", defaultValue = "create_time") String sort
                ,@RequestParam(value = "order",defaultValue = "asc") String order
                ,@RequestParam(value ="distId",required = false) String distId
        );

        /*admin签收详情*/
        @GetMapping(value = "platformCab/order/admin/orderDelivery/getDetail")
        JSONObject getDetail(@RequestParam("deliveryOrderCode") String deliveryOrderCode);


        /*配送物资信息*/
//        @GetMapping(value = "platformCab/order/admin/orderDelivery/getDeliveryInfo")
//        JsonResult<OrderDeliveryVO> getDeliveryInfo();

        /*cab_cell_inventory_inout表同步*/
//        @PostMapping(value = "/platformCab/cabinet/admin/cellInventoryInout/syncData")
//        JsonResult syncCabCellIncentoryInout(
//                @RequestHeader(value = "secret",required = false)String secret
//                ,@RequestParam(value ="list") List<CellInventoryInout> list
//        );

        /*cab_cell_inventory_inout_detail表同步*/
//        @PostMapping(value = "/platformCab/cabinet/admin/cellInventoryInoutDetail/syncData")
//        JsonResult syncCabCellIncentoryInoutDetail(
//                @RequestHeader(value = "secret",required = false)String secret
//                ,@RequestParam(value ="list") List<CellInventoryInoutDetail> list
//        );

        /*cab_cell_inventory_product表同步*/
//        @PostMapping(value = "/platformCab/cabinet/admin/cellInventoryProduct/syncData")
//        JsonResult syncCellInventoryProduct(
//                @RequestHeader(value = "secret",required = false)String secret
//                ,@RequestParam(value ="list") List<CellInventoryProduct> list
//        );

        /*cab_cell_inventory_space表同步*/
//        @PostMapping(value = "/platformCab/cabinet/admin/cellInventorySpace/syncData")
//        JsonResult syncCellInventorySpace(
//                @RequestHeader(value = "secret",required = false)String secret
//                ,@RequestParam(value ="list") List<CellInventorySpace> list
//        );

        /*cab_cell_single_inventory_product表同步*/
//        @PostMapping(value = "/platformCab/cabinet/admin/cellSingleInventoryProduct/syncData")
//        JsonResult syncCellSingleInventoryProduct(
//                @RequestHeader(value = "secret",required = false)String secret
//                ,@RequestParam(value ="list") List<CellSingleInventoryProduct> list
//        );

        /*cab_storage_inventory_inout表同步*/
//        @PostMapping(value = "/platformCab/cabinet/admin/storageInventoryInout/syncData")
//        JsonResult syncStorageInventoryInout(
//                @RequestHeader(value = "secret",required = false)String secret
//                ,@RequestParam(value ="list") List<StorageInventoryInout> list
//        );

        /*cab_storage_inventory_inout_detail表同步*/
//        @PostMapping(value = "/platformCab/cabinet/admin/storageInventoryInoutDetail/syncData")
//        JsonResult syncStorageInventoryInoutDetail(
//                @RequestHeader(value = "secret",required = false)String secret
//                ,@RequestParam(value ="list") List<StorageInventoryInoutDetail> list
//        );

        /*cab_storage_inventory_product表同步*/
//        @PostMapping(value = "/platformCab/cabinet/admin/storageInventoryProduct/syncData")
//        JsonResult syncStorageInventoryProduct(
//                @RequestHeader(value = "secret",required = false)String secret
//                ,@RequestParam(value ="list") List<StorageInventoryProduct> list
//        );

        /*cab_storage_inventory_space表同步*/
//        @PostMapping(value = "/platformCab/cabinet/admin/storageInventorySpace/syncData")
//        JsonResult syncStorageInventorySpace(
//                @RequestHeader(value = "secret",required = false)String secret
//                ,@RequestParam(value ="list") List<StorageInventorySpace> list
//        );

        /*cab_storage_single_inventory_product表同步*/
//        @PostMapping(value = "/platformCab/cabinet/admin/storageSingleInventoryProduct/syncData")
//        JsonResult syncStorageSingleInventoryProduct(
//                @RequestHeader(value = "secret",required = false)String secret
//                ,@RequestParam(value ="list") List<StorageSingleInventoryProduct> list
//        );
        /*修改配送表*/
        @GetMapping("/platformCab/order/app/orderDelivery/upDelivery")
        public JsonResult upDelivery(@RequestParam(value = "id") Long id);

        /*商品列表 top*/
        @GetMapping("/platformCab/order/app/orderDelivery/getDeliverInfo")
        public OrderDeliveryVO getDeliverInfo(@RequestParam(value = "deliveryOrderCode") String deliveryOrderCode);

        /*修改配送单的签收数*/
        @GetMapping("/platformCab/order/app/orderDelivery/upRealReceive")
        public JsonResult upRealReceive(@RequestParam(value = "packLabelCode")String packLabelCode,@RequestParam(value = "deliveryId")Long deliveryId,@RequestParam(value = "realReceive")Integer realReceive);

    /*配货管理签收任务列表，从平台查询*/
    @GetMapping(value = "platformCab/order/admin/orderDelivery/getOrderDeliveryVOList")
    PageResult<OrderDeliveryVO> getOrderDeliveryVOList(
            @RequestParam(value ="page", defaultValue = "1") Integer page
            ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
            ,@RequestParam(value ="sort", defaultValue = "create_time") String sort
            ,@RequestParam(value = "order",defaultValue = "asc") String order
            ,@RequestParam(value ="deliveryOrderCode",required = false) String deliveryOrderCode
            ,@RequestParam(value ="distCode",required = false) String distCode
            ,@RequestParam(value ="startCreateTime",required = false) String startCreateTime
            ,@RequestParam(value ="endCreateTime",required = false) String endCreateTime
    );

    /*配货管理签收任务配详情列表，从平台查询*/
    @GetMapping(value = "platformCab/order/admin/orderDelivery/getOrderDeliveryDetailVOList")
    JsonResult<List<OrderDeliveryDetailVO>> getOrderDeliveryDetailVOList(
            @RequestParam(value = "deliveryId",required = true) Long deliveryId
    );
    /*配货管理签收任务扫描包装编码，从平台查询*/
    @GetMapping(value = "platformCab/order/admin/orderDelivery/getOrderDistributionLabelVOByCode")
    JsonResult<OrderDistributionLabelVO> getOrderDistributionLabelVOByCode(
            @RequestParam(value = "packLabelCode",required = true) String packLabelCode
            ,@RequestParam(value = "deliveryId",required = true) Long deliveryId
    );
    /*配货管理签收任务 查询签收任务产品已签收的包装条码，从平台查询*/
    @GetMapping(value = "platformCab/order/admin/orderDelivery/getProductPackLabelSign")
    JsonResult<List<OrderDistributionLabelVO>> getProductPackLabelSign(
            @RequestParam(value = "deliveryDetailId",required = true) Long deliveryDetailId
    );
    /*配货管理签收任务 签收包装条码，从平台查询*/
    @PostMapping(value = "platformCab/order/admin/orderDelivery/deliverySign")
    JsonResult deliverySign(
            @RequestBody  List<OrderDistributionLabelVO> signList
    );
    /*查询配送单，从平台查询*/
    @GetMapping(value = "platformCab/order/admin/orderDelivery/getOrderDeliveryVOById")
    JsonResult<OrderDeliveryVO> getOrderDeliveryVOById(
            @RequestParam(value = "id",required = true) Long id
    );
    /*查询配送单明细，从平台查询*/
    @GetMapping(value = "platformCab/order/admin/orderDelivery/getOrderDeliveryDetailVOById")
    JsonResult<List<OrderDeliveryDetail>> getOrderDeliveryDetailVOById(
            @RequestParam(value = "deliveryId",required = true) Long deliveryId
    );
    /*查询配送单包装码的总数和签收数，从平台查询*/
    @GetMapping(value = "platformCab/order/admin/orderDelivery/getDeliverySignSum")
    JsonResult<Map> getDeliverySignSum(
            @RequestParam(value = "deliveryId",required = true) Long deliveryId
    );
    /*查询配送单产品的包装条码总数和签收数，从平台查询*/
    @GetMapping(value = "platformCab/order/admin/orderDelivery/getDeliveryProductSignSum")
    JsonResult<Map> getDeliveryProductSignSum(
            @RequestParam(value = "deliveryDetailId",required = true) Long deliveryDetailId
    );

    /*云仓出库领货记录列表*/
    @GetMapping(value = "platformCab/order/app/orderDelivery/getOrderDeliveryList")
    PageResult<OrderDeliveryVO> getOrderDeliveryList(
              @RequestParam(value = "page") Integer page
            , @RequestParam(value = "sort") String sort
            , @RequestParam(value = "order") String order
            , @RequestParam(value = "limit") Integer limit
            , @RequestParam(value = "status") Integer status
            , @RequestParam(value = "deliveryOrderCode") String deliveryOrderCode
            , @RequestParam(value = "startCreateTime") String startCreateTime
            , @RequestParam(value = "endCreateTime") String endCreateTime
    );
    /*云仓出库领货记录详情列表*/
    @GetMapping(value = "platformCab/order/app/orderDeliveryDetail/getOrderDeliveryDetailList")
    PageResult<OrderDeliveryDetailVO> getOrderDeliveryDetailList(
            @RequestParam(value ="page", defaultValue = "1") Integer page
            ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
            ,@RequestParam(value ="sort", defaultValue = "create_time") String sort
            ,@RequestParam(value = "order",defaultValue = "asc") String order
            ,@RequestParam(value = "deliveryId") Long deliveryId
            ,@RequestParam(value = "id",required = false)Long id
    );

    /**
     * 根据企业code查询企业信息
     * @param companyCode
     * @return
     */
    @GetMapping(value = "platform/company/admin/company/getCompanyInfoByCode")
    JsonResult getCompanyInfoByCode(@RequestParam(value = "companyCode") String companyCode);

    @GetMapping(value = "platform/company/app/company/getCompanyInfoByCode")
    JsonResult getCompanyInfoByCodeApp(@RequestParam(value = "companyCode") String companyCode);

    @GetMapping(value = "platform/industry/admin/industry/getTreeData")
    JsonResult getTreeData();
    /*企业端进销存出库 数据同步到平台端*/
    /*@PostMapping(value = "platform/order/admin/inventoryInoutJob/addOutInventoryInoutJob")
    JsonResult addOutInventoryInoutJob(@RequestBody String params);*/
    /*新接口企业端进销存出库 数据同步到平台端*/
    @PostMapping(value = "platform/order/admin/inventoryInoutJob/addOutInventoryInoutJob")
    JsonResult addOutInventoryInoutJob(@RequestBody InventoryInoutJobVO inventoryInoutJobVO);

/*    @GetMapping("/platformCab/cabinet/admin/sysSetting/getSettingList")
    List<SysSettingVO> getSettingList();*/

    @PostMapping("platformCab/order/admin/distributionDemand/synDistributionDemand")
    JsonResult synDistributionDemand(@RequestBody DistributionDemandForm distributionDemandForm);

    //刀具柜系统设置列表
    @GetMapping("platformCab/cabinet/app/sysSetting/getSettingList")
     SysSettingVO getSettingList();

    //刀具柜系统设置 根据id查询
    @GetMapping("/platformCab/cabinet/app/sysSetting/getSettingById")
    SysSettingAdvert getSettingById(@RequestParam(value ="enterpriseId")Long enterpriseId,@RequestParam(value ="encrypt")String encrypt,@RequestParam(value = "id")Long id);

    //刀具柜系统设置 修改详情
    @PostMapping("/platformCab/cabinet/app/sysSetting/upDate")
    JsonResult<SysSettingVO> upDate(@RequestBody SysSettingVO sysSettingVO);

    //添加刀具柜系统设置
    @PostMapping("/platformCab/cabinet/app/sysSetting/addSetting")
    JsonResult<SysSettingForm> addSetting(@RequestBody SysSettingForm sysSettingForm);

    //查询APP端版本管理 列表
    @GetMapping("platform/version/app/version/versionList")
    List<Version> versionList(@RequestParam(value = "type") String type);

    //根据type 查询所有版本
    @GetMapping("platform/version/app/version/getVersion")
    JsonResult<Version> getVersion(@RequestParam(value = "type") String type,@RequestParam(value = "enterpriseId",required = false) String enterpriseId);
/*
    //修改APP端版本管理表
    @PutMapping("platform/version/app/version/update")
    JsonResult<VersionForm>updateVersion(@RequestBody VersionForm versionForm);

    //添加app端版本管理
    @PostMapping("platform/version/app/version/add")
    JsonResult<VersionForm> addVersion(@RequestBody VersionForm versionForm);*/

    /*product表新增数据根据productId从平台端的product表查询获取*/
    @GetMapping(value = "/platformWarehouse/warehouse/admin/warehouseArea/getAreaByWarehouseId")
    JsonResult<WarehouseArea> getAreaByWarehouseId(
            @RequestParam(value ="warehouseId") Long warehouseId
    );

    /*从平台端查询仓库信息*/
    @GetMapping(value = "/platformCloud/warehouse/admin/warehouse/getWarehouseById")
    JsonResult<WarehouseVO> getWarehouseById(
            @RequestParam(value ="warehouseId") Long warehouseId
    );
    //小程序广告列表
    @GetMapping("platformCab/cabinet/app/sysSetting/getAdvertList")
    SysSettingVO getAdvertList(@RequestParam(value ="enterpriseId")Long enterpriseId,@RequestParam(value ="encrypt")String encrypt);

    /*根据skuCode获取平台端的库存分布信息*/
    @GetMapping("platform/order/admin/inventoryProduct/getProductInventoryBySkuCode")
    PageResult<ProductDetailVO> getProductInventoryBySkuCode(
            @RequestParam(value ="page", defaultValue = "1") Integer page
            ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
            ,@RequestParam(value ="skuCode") String skuCode);

    /*根据skuCode和warehouseId查询平台端料箱*/
    @GetMapping("platform/order/admin/inventoryProduct/getBoxLabBySkuCodeAndWarehouseId")
    JsonResult<List<InventoryJobBoxLabelVO>> getBoxLabBySkuCodeAndWarehouseId(
            @RequestParam(value ="skuCode") String skuCode
            ,@RequestParam(value ="warehouseId") Long warehouseId);

    /*根据skuCode和warehouseId统计平台端料箱和库位*/
    @GetMapping("platform/order/admin/inventoryProduct/getStorageWorkBinBySkuAndWarehouseId")
    JsonResult<ProductDetailVO> getStorageWorkBinBySkuAndWarehouseId(@RequestParam(value ="skuCode") String skuCode,@RequestParam(value ="warehouseId") Long warehouseId);

    /*根据skuCode和企业id查询平台端库存*/
    @GetMapping("platform/order/admin/inventoryProduct/getRepertoryBySkuCodeByCompanyId")
    JsonResult<List<InventoryProductVO>> getRepertoryBySkuCodeByCompanyId(@RequestParam(value ="skuCode") String skuCode, @RequestParam(value ="enterpriseId") String enterpriseId);

    /*查询平台端仓库*/
    @GetMapping("platformCloud/warehouse/admin/warehouse/getAll")
    JsonResult<List<Warehouse>> getPlatformWarehouseAll(@RequestParam(name="province",required = false) Long province,@RequestParam(name="city",required = false) Long city);

    @GetMapping(value = "platformCab/cabinet/admin/supplier/getSupplierById")
    JsonResult getEnterpriseById(@RequestParam(value ="id")Long id);

    @GetMapping("platform/product/admin/productType/getProductTypeByType")
    JsonResult getProductTypeByType(@RequestParam(value = "type") Integer type);

    @GetMapping("platform/product/admin/productCategory/getProductCategoryByType")
    JsonResult getProductCategoryByType(@RequestParam(value = "type") Integer type);

    @GetMapping("platform/product/admin/productBrand/getProductBrandByType")
    JsonResult getProductBrandByType(@RequestParam(value = "type") Integer type);

    @GetMapping("platform/product/admin/productUnit/getProductUnitByType")
    JsonResult getProductUnitByType(@RequestParam(value = "type") Integer type);


    /*反馈工单列表，从平台查询*/
    @GetMapping(value = "platformCab/work/admin/workOrder/list")
    PageResult<WorkOrder> getAllWorkOrderList(
            @RequestParam(value ="page", defaultValue = "1") Integer page
            ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
            ,@RequestParam(value ="sort", defaultValue = "create_time") String sort
            ,@RequestParam(value = "order",defaultValue = "asc") String order
            ,@RequestParam(value = "wordOrderType") String wordOrderType
            ,@RequestParam(value = "workOrderCode",required = false) String workOrderCode
            ,@RequestParam(value = "productId",required = false) String productId
            ,@RequestParam(value = "moduleId",required = false) String moduleId
            ,@RequestParam(value = "feedbackId",required = false) String feedbackId
            ,@RequestParam(value = "content",required = false) String content
            ,@RequestParam(value = "priority",required = false) String priority
            ,@RequestParam(value = "createTime",required = false) String createTime
            ,@RequestParam(value = "workOrderStatus",required = false) String workOrderStatus
            ,@RequestParam(value = "actualFinishTime",required = false) Long actualFinishTime
            ,@RequestParam(value = "enterpriseId",required = false) Long enterpriseId
            ,@RequestParam(value = "sellId",required = false) String sellId
    );

    /*获取工单生命周期*/
    @GetMapping(value = "platformCab/work/admin/workOrderRecord/tree")
    JsonResult getLifecycleByWorkOrderId(@RequestParam(value ="workOrderId")Long workOrderId);

    /*关闭工单*/
    @PutMapping(value = "platformCab/work/admin/workOrderAccomplish/closeWorkOrder/{id}/{closeName}")
    JsonResult closeWorkOrder(@PathVariable("id") Long id,@PathVariable("closeName") String closeName);

    /*获取产品反馈分类，从平台查询*/
    @GetMapping(value = "platformCab/work/admin/productFeedbackCategory/getProductFeedbackCategory")
    JsonResult getSystemMsgCategory();

    @GetMapping(value = "platform/product/admin/productSpec/getProductSpecByProductTypeId")
    JsonResult getProductSpecByProductTypeId(@RequestParam("productTypeId") Long productTypeId);

    @GetMapping(value = "platform/product/admin/productAttribute/getProductAttrByProductTypeId")
    JsonResult getProductAttrByProductTypeId(@RequestParam("productTypeId")Long productTypeId);

    /*添加工单，从平台查询*/
    @PostMapping(value = "platformCab/work/admin/workOrderUnclaimed/add")
    JsonResult addWorkOrder(@RequestBody WorkOrderForm workOrderForm);

    /*回复工单，从平台查询*/
    @PostMapping("platformCab/work/admin/workOrderRecord/reply")
    JsonResult replyWorkOrder(@RequestBody WorkOrderRecordForm workOrderRecordForm);

    /*根据工单id查询最新的数据，从平台查询*/
    @GetMapping(value = "platformCab/work/admin/workOrderRecord/getLatestByWordOrderId")
    JsonResult<WorkOrderRecordVO> getLatestByWordOrderId(@RequestParam(value ="wordOrderId") Long wordOrderId);

    /*获取售后反馈分类，从平台查询*/
    @GetMapping(value = "platformCab/work/admin/sellOrderCategory/getSellOrderCategory")
    JsonResult getSellOrderCategory();



    /*获取平台设置的主板类型*/
    @GetMapping(value = "platform/product/admin/mainboardType/list")
    Object getMainboardType(@RequestParam(value="page", defaultValue = "1") Integer page
            ,@RequestParam(value="limit",defaultValue = "10") Integer limit
            ,@RequestParam(value="sort",defaultValue = "create_time") String sort
            ,@RequestParam(value="order",defaultValue = "asc") String order
            ,@RequestParam(value="code",required = false)String code//主板类型编号
            ,@RequestParam(value="name",required = false)String name//主板类型名称
            ,@RequestParam(value="supplierName",required = false)String supplierName//供应商名称
            ,@RequestParam(value="isDeleted",required = false)Boolean isDeleted//主板类型是否启用
    );
    /*获取平台设置的控制面板类型*/
    @GetMapping(value = "platform/product/admin/controlpanelType/list")
    Object getControlpanelType(
            @RequestParam(value="page",defaultValue = "1") Integer page
            , @RequestParam(value="limit",defaultValue = "10") Integer limit
            , @RequestParam(value="sort",defaultValue = "create_time") String sort
            , @RequestParam(value="order",defaultValue = "asc") String order
            , @RequestParam(value="code",required = false)String code//控制面板编号
            , @RequestParam(value="name",required = false)String name//控制面板名称
            , @RequestParam(value="supplierName",required = false)String supplierName//供应商名称
            , @RequestParam(value="isDeleted",required = false)Boolean isDeleted//控制面板是否启用
    );
    /*获取平台设置的升降主机类型*/
    @GetMapping(value = "platform/product/admin/lifthostType/list")
    Object getLifthostType(@RequestParam(value="page",defaultValue = "1") Integer page
            ,@RequestParam(value="limit",defaultValue = "10") Integer limit
            ,@RequestParam(value="sort",defaultValue = "create_time") String sort
            ,@RequestParam(value="order",defaultValue = "asc") String order
            ,@RequestParam(value="code",required = false)String code//升降主机编号
            ,@RequestParam(value="name",required = false)String name//升降主机名称
            ,@RequestParam(value="supplierName",required = false)String supplierName//供应商名称
            ,@RequestParam(value="isDeleted",required = false)Boolean isDeleted//升降主机是否启用
    );

    @PostMapping("platformWeb/systemWeb/admin/clientCase/updateClientCase")
    JsonResult clientCaseUpdate(@RequestBody ClientCase clientCase);


    @PostMapping("platformWeb/systemWeb/admin/clientCase/addClientCase")
    JsonResult clientCaseAdd(@RequestBody ClientCase clientCase);

    @GetMapping("platformWeb/systemWeb/admin/clientCase/deleteClientCase")
    JsonResult deleteClientCase(@RequestParam(value="enterpriseId") String enterpriseId
                                ,@RequestParam(value="substituteId") Long substituteId);

    @PostMapping("platformWeb/qualificationWeb/admin/qualification/addQualification")
     JsonResult addQualification(@RequestBody QualificationForm qualificationForm);

    @PostMapping("platformWeb/qualificationWeb/admin/qualification/updateQualification")
     JsonResult updateQualification(@RequestBody QualificationForm qualificationForm);

    @GetMapping("platformWeb/qualificationWeb/admin/qualification/deleteQualification")
     JsonResult deleteQualification(@RequestParam(value="enterpriseId") Long enterpriseId, @RequestParam(value="substituteId") String substituteId);

    /**
     * 查询是否为云仓供应商
     * @param code
     * @return
     */
    @GetMapping("platform/purchase/admin/supplierInfo/cloudProvider")
    JsonResult cloudProvider(@RequestParam(value="code") String code);

    @GetMapping("platform/product/admin/productDetailWMS/list")
    PageResult<ProductDetailVO> getPlatformProductDetailVOList(
            @RequestParam(value ="page", defaultValue = "1") Integer page
            ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
            ,@RequestParam(value ="sort", defaultValue = "create_time") String sort
            ,@RequestParam(value = "order",defaultValue = "asc") String order
            ,@RequestParam(value = "cloud",defaultValue = "false") Boolean cloud
            ,@RequestParam(value = "skuName",required = false)String skuName
            ,@RequestParam(value = "skuCode",required = false)String skuCode
            ,@RequestParam(value = "productCategoryId",required = false)String productCategoryId
            ,@RequestParam(value = "skuSpecValueNames",required = false)String skuSpecValueNames
    );
    /*查询平台的产品分类*/
    @GetMapping(value = "platform/product/admin/productCategory/getAll")
    JsonResult platformProductCategoryList();
    /*查询平台的产品类型*/
    @GetMapping(value = "platform/product/admin/productType/getAll")
    JsonResult platformProductTypeList();

    @GetMapping("platform/product/admin/productBrand/getAll")
    List<ProductBrandPlatformVO> platformBrandAll();

    /*查询平台的产品单位*/
    @GetMapping(value = "platform/product/admin/productUnit/getAll")
    JsonResult platformProductUnitList();
    /*查询平台的产品单位*/
    @GetMapping(value = "platform/product/admin/productSeries/getAll")
    JsonResult platformProductSeriesList();
    @GetMapping(value = "platform/product/admin/productSeries/list")
    PageResult<Product> platformProductSeries(
            @RequestParam(value = "page",defaultValue = "1") Integer page
            ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
            ,@RequestParam(value = "sort",defaultValue = "create_time") String sort
            ,@RequestParam(value = "order",defaultValue = "desc") String order
            ,@RequestParam(value = "productCode",required = false) String productCode
            ,@RequestParam(value = "name",required = false) String name
            ,@RequestParam(value = "dataSourceType",required = false) Integer dataSourceType
            ,@RequestParam(value = "typeEnumCode",required = false) String typeEnumCode
            ,@RequestParam(value = "productTypeId",required = false) Long productTypeId
            ,@RequestParam(value = "isLocalImport",required = false) Integer isLocalImport);
    /*查询平台的产品*/
    @PostMapping(value = "platform/product/admin/productSeries/getProductSync")
    JsonResult<ProductSyncVO> getProductSync(@RequestBody ProductSyncVO productVO);
    /*查询平台的产品*/
    @PostMapping(value = "platform/product/admin/productSeries/cloudProduct")
    JsonResult cloudProduct(@RequestBody ProductSyncVO productVO);

    /*查询平台的产品*/
    @PostMapping(value = "platform/product/admin/productSeries/syncProduct")
    JsonResult syncProduct(@RequestBody ProductSyncVO productVO);

    //同步云仓入库计划
    @PostMapping("/platformCloud/cloudStorage/admin/inventoryInoutPlan/add")
    JsonResult syncCloudStoragePlan(@RequestBody InventoryInoutPlanForm inventoryInoutPlanForm);

    @GetMapping("/supplier/systemSp/admin/systemOfficialInfo/list")
    JsonResult getLogo(String channelCode);
    //查询渠道产品
    @GetMapping("platform/product/app/productDetail/getProductDetailList")
    PageResult<ProductDetailVO> getChannelProductDetailList(
            @RequestParam(value ="page", defaultValue = "1") Integer page
            ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
            ,@RequestParam(value ="sort", defaultValue = "pd.create_time") String sort
            ,@RequestParam(value = "order",defaultValue = "desc") String order
            ,@RequestParam(value = "skuName",required = false)String skuName
            ,@RequestParam(value = "skuCode",required = false)String skuCode
            ,@RequestParam(value = "enterpriseCode",required = false)String enter
    );

    /**
     * 添加柜子采购订单
     * @param orderForm
     * @return
     */
    @PostMapping("/platform/sell/app/order/add")
    JsonResult addCabinetPurchaseOrder(@RequestBody OrderForm orderForm);

    /**
     * 查询智能柜采购订单
     * @param page
     * @param limit
     * @param sort
     * @param order
     * @param enterpriseCode
     * @param code
     * @return
     */
    @GetMapping("platform/sell/admin/order/list")
    PageResult<OrderVO> getCabinetPurchaseOrderList(
            @RequestParam(value ="page", defaultValue = "1") Integer page
            ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
            ,@RequestParam(value ="sort", defaultValue = "pd.create_time") String sort
            ,@RequestParam(value = "order",defaultValue = "desc") String order
            ,@RequestParam(value = "enterpriseCode",required = false)String enterpriseCode
            ,@RequestParam(value = "code",required = false)String code
    );

    @GetMapping("platform/sell/admin/orderPro/list")
    PageResult<OrderProVO> getCabinetPurchaseOrderProVOList(
            @RequestParam(value ="page", defaultValue = "1") Integer page
            ,@RequestParam(value = "limit",defaultValue = "10") Integer limit
            ,@RequestParam(value ="sort", defaultValue = "pd.create_time") String sort
            ,@RequestParam(value = "order",defaultValue = "desc") String order
            ,@RequestParam(value = "orderId",required = false)Long orderId
    );

    /**
     * 修改柜子采购订单
     * @param orderForm
     * @return
     */
    @PutMapping("/platform/sell/admin/order/update")
    JsonResult updateCabinetPurchaseOrder(@RequestBody OrderForm orderForm);

    @GetMapping("/supplier/systemSp/admin/systemOfficialInfo/getInfoByEnterpriseCode")
    JsonResult<SystemOfficialInfo> getInfoByEnterpriseCode(@RequestParam(value="enterpriseCode") String enterpriseCode);

    @GetMapping("/supplier/sell/app/helpCenterCategory/list")
    public PageResult<HelpCenterCategory> helpCenterCategoryList(
            @RequestParam(value = "page") Integer page
            , @RequestParam(value = "limit") Integer limit
            , @RequestParam(value = "sort") String sort
            , @RequestParam(value = "order") String order
            ,@RequestParam(value = "name",required = false) String name
            ,@RequestParam(value = "enterpriseCode",required = false) String enterpriseCode
            ,@RequestParam(value = "parentId",required = false) Long parentId
    );

    @GetMapping("/supplier/sell/app/helpCenter/list")
    public PageResult<HelpCenterVO> helpCenterList(
            @RequestParam(value = "page") Integer page
            , @RequestParam(value = "limit") Integer limit
            , @RequestParam(value = "sort") String sort
            , @RequestParam(value = "order") String order
            , @RequestParam(value = "helpCategoryId",required = false) Long helpCategoryId
            , @RequestParam(value = "keyword",required = false) String keyword
            , @RequestParam(value = "status",required = false) HelpCenter.Status status
            ,@RequestParam(value = "enterpriseCode",required = false) String enterpriseCode
    );
}
